#include "xfb_array.h"

#include <assert.h>
#include <stddef.h>
#include <stdio.h>

typedef struct student {
  int id;
  float yu_wen;
  float shu_xue;
  float yin_yu;
} student_t;

int main()
{
  xf_array_t v;
  xf_array_init(&v);

  student_t stu0;
  stu0.id = 2;

  student_t stu1;
  stu1.id = 3;

  xf_array_push(&v, &stu0);
  xf_array_push(&v, &stu1);

  student_t *iter = (student_t*)v.items[0];
  printf("%d\n", iter->id);
  student_t *unuse = (student_t *)xf_array_pop(&v);
  assert(unuse != 0);

  printf("size : %lu\n", xf_array_size(&v));
  unuse->id = 10000;
  printf("stu1 : %d\n", stu1.id);
}
